package net.jblog.struts.frontoffice.module.view;

public class ArchiveCounter implements Comparable<ArchiveCounter> {
	private Integer month;
	private Integer year;
	private long counter;
	
	public Integer getMonth() {
		return month;
	}
	public void setMonth(Integer month) {
		this.month = month;
	}
	public Integer getYear() {
		return year;
	}
	public void setYear(Integer year) {
		this.year = year;
	}
	public long getCounter() {
		return counter;
	}
	public void setCounter(long counter) {
		this.counter = counter;
	}
	
	@Override
	public int compareTo(ArchiveCounter o) {
		if(o.getYear().equals(this.getYear())) {
			return o.getMonth().compareTo(this.getMonth());
		} else {
			return o.getYear().compareTo(this.getYear());
		}
	}
}
